﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Clandestine;

namespace JibberJabber
{
    public partial class frmPan : Form
    {
        public frmPan()
        {
            InitializeComponent();
        }

        private void cmdReset_Click(object sender, EventArgs e)
        {
            Camera.Position = System.Drawing.PointF.Empty;
        }

        private void cmdDone_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private float getMoveAmount(float max)
        {
            return (((float)tbAmount.Value) / tbAmount.Maximum) * max;
        }

        private void button2_Click(object sender, EventArgs e)
        {
            Camera.Position.X -= getMoveAmount(Graphics.ScreenWidth / 2f);
        }

        private void button3_Click(object sender, EventArgs e)
        {
            Camera.Position.X += getMoveAmount(Graphics.ScreenWidth / 2f);
        }

        private void button4_Click(object sender, EventArgs e)
        {
            Camera.Position.Y += getMoveAmount(Graphics.ScreenHeight / 2f);
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Camera.Position.Y -= getMoveAmount(Graphics.ScreenHeight / 2f);
        }
    }
}
